Skip to content

Allow Codex Ask AI outside git repos#965

Merged
backnotprop merged 1 commit into
backnotprop:mainfrom
ericclemmons:skip-git-repo-check-for-plain-plan-review
Jun 25, 2026
Merged

Allow Codex Ask AI outside git repos#965
backnotprop merged 1 commit into
backnotprop:mainfrom
ericclemmons:skip-git-repo-check-for-plain-plan-review

Conversation

@ericclemmons

@ericclemmons ericclemmons commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect whether the Codex Ask AI working directory is inside a Git worktree

  • pass Codex SDK skipGitRepoCheck only for standalone/non-repo sessions

    Screenshot 2026-06-24 at 9 40 41 PM
  • keep the default Codex git repo safety check for repo-backed review sessions

Validation

  • npx -p typescript tsc --noEmit -p packages/ai/tsconfig.json
  • npx -p tsx tsx -e "import { shouldSkipGitRepoCheck } from './packages/ai/providers/codex-sdk.ts'; if (shouldSkipGitRepoCheck(process.cwd())) throw new Error('repo cwd should not skip'); if (!shouldSkipGitRepoCheck('/Users/eric/Documents/Codex/2026-06-24/does')) throw new Error('plain Codex session should skip'); console.log('ok')"

Note: full bun test was not run locally because bun is not installed in this environment and the one-off runner could not resolve the repo workspace DOM test setup.

@ericclemmons ericclemmons force-pushed the skip-git-repo-check-for-plain-plan-review branch from de636ed to 76946ed Compare June 25, 2026 02:37
@ericclemmons ericclemmons marked this pull request as ready for review June 25, 2026 02:41
@backnotprop backnotprop merged commit 63ed44e into backnotprop:main Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants